<template>
  <div>
    <Head v-if="equipments == 'pc'" />
    <headMobile v-if="equipments == 'phone'" />
    <router-view
      :equipment="equipments"
      style="text-align: center;"
      @publicfooter="footer"
    ></router-view>
    <Foot v-if="equipments == 'pc' && footerShow" />
    <footMobile v-if="equipments == 'phone'" />
  </div>
</template>

<script>
export default {
  name: "WebsiteHome",
  components: {
    Head: () => import("./component/Head"),
    Foot: () => import("./component/Foot.vue"),
    headMobile: () => import("./component/headMobile"),
    footMobile: () => import("./component/footMobile")
  },
  props: {
    equipments: {
      type: String,
      default: "pc"
    }
  },
  data() {
    return {
      equipment: "",
      header_show: true,
      footerShow: true
    };
  },
  created() {
    this.equipment = this.equipments;
  },
  methods: {
    // 是否显示头部
    // public_header:function (bool) {
    // this.header_show = bool;
    // },
    // 是否显示底部
    footer: function(bool) {
      this.footerShow = bool;
    }
  }
};
</script>
